//
// Created by tang on 3/6/23.
//

#ifndef PIINFO_HTTP_SERVICE_HPP
#define PIINFO_HTTP_SERVICE_HPP

#include "service/svc_manager.hpp"

#include <memory>

class PI_API IHttpService : public TaggedService<service_type::http> {
public:
    class PI_API IHttpGet {
    public:
        virtual ~IHttpGet() = default;
        virtual IHttpGet* add_header(const std::string &key, const std::string &value) = 0;
        virtual IHttpGet* add_param(const std::string &key, const std::string &value) = 0;
        virtual IHttpGet* ssl(bool on) = 0;
        virtual std::string perform() = 0;
    };
    using HttpGetPtr = std::unique_ptr<IHttpGet>;

    virtual HttpGetPtr new_get(const std::string& base_url) = 0;
};

#endif  // PIINFO_HTTP_SERVICE_HPP
